package com.akk.module.authentication;


import com.akk.module.authentication.enums.AuthEnums;

public final class AuthFactory {

    @SuppressWarnings("unchecked")
    public static <T extends AuthService>T  build(Integer type){
        //配置信息
        if(type == AuthEnums.AuthType.ID_CARD.getValue()) {
            //身份证实名
            return (T) IdCardAuthService.getInstance();
        }
        if(type == AuthEnums.AuthType.BANK_CARD.getValue()) {
            //银行卡实名
            return (T) BankCardAuthService.getInstance();
        }
        if(type == AuthEnums.AuthType.COMPANY.getValue()) {
            //企业实名
            return (T) CompanyAuthService.getInstance();
        }
        return null;
    }
}
